<!--# layout("/common/layout.html",{"jsBase":"/js/contract/contractInfo/"}){ -->

<style>
    .ttd{
        width:300px;
    }
    .ttd2{
        width:100px;
    }
    .ttd p{
        margin-top: 10px;
    }
    .tbodyColor{
        background-color: #eeeeee;
    }
    .tdColor{
        background-color: #FFFFFF;
    }

</style>


<table  class="layui-table" lay-skin="row " id="table1">
    <colgroup>
        <col width="250">
        <col width="200">
        <col width="200">
        <col width="200">
        <col width="200">
    </colgroup>
    <template v-for="(item,index) in ServiceList" >
        <thead>
        <tr style="background: #CCCCCC; height: 15px;">
            <td colspan="5"></td>
        </tr>
        </thead>


        <tbody name="tbodyTemplate">
        <thead>
        <tr>
            <th >{{item.graduateYear}}届−{{item.studentName}}−{{item.btypename}}服务</th>
            <th>家长电话{{item.customerPhone}}</th>
            <th>2019-03-05 12:00:22</th>
            <th></th>
            <th></th>
        </tr>
        </thead>
        <tr>
            <td class="ttd">
                <p>服务账号 <span style="float: right;"> {{item.studentPhone}}</span> </p>
                <p>省份:
                    <span style="float: right;" v-if="item.schoolExt.length>2">{{ JSON.parse(item.schoolExt).prov }}</span>
                    <span style="float: right;" v-else></span>
                </p>

                <p>中学名称:
                    <span style="float: right;" v-if="item.schoolExt"> {{ JSON.parse(item.schoolExt).school }}</span>
                    <span style="float: right;" v-else> </span>
                </p>
            </td>
            <td class="ttd">
                <p>签单老师 <span style="float: right;"> {{item.servantname}}</span> </p>
                <p>服务节点: <span style="float: right;">
                    <span v-if="item.sort=='' || item.sort=='null'">未开始</span>
                    <span v-else-if="item.sort==item.maxsort">结束</span>
                    <span v-else>{{item.nodeName}}</span>

                </span> </p>
                <p>服务老师: <span style="float: right;"> {{item.sellername}}</span> </p>
            </td>
            <td class="ttd">
                <p >确认收款
                    <span style="float: right;" v-if="item.fkStatus=0" > 未付款</span>
                    <span style="float: right;" v-else-if="item.fkStatus=1" > 已付款</span>
                    <span style="float: right;" v-else="item.fkStatus=2" > 已确认</span>
                </p>

            </td>
            <td class="ttd">
                <p>服务状态
                    <span style="float: right;" v-if="item.sort=='' || item.sort=='null'"> 未开始</span>
                    <span style="float: right;" v-else-if="item.sort==item.maxsort">已完成</span>
                    <span style="float: right;" v-else>服务中 </span>

                </p>
            </td>
            <td class="ttd">
                <button style="margin-left: 20px" name="editServiceDetails"
                        v-bind:contractId="item.contractId"
                        v-bind:typeid="item.btypeid"
                        v-bind:typename="item.btypename"
                        v-bind:tableindex="index"
                        v-on:click="editServiceDetailsClick($event)"
                        class="layui-btn layui-btn-radius layui-btn-primary">服务详情</button>
            </td>
        </tr>
        </tbody>


    </template>

</table>




<!--footer-->
<script type="text/javascript">
    window.index=-1;

    layui.use(['jquery','form','table','laypage'],function () {
        var $ = layui.jquery;
        var form = layui.form;
        var table = layui.table;
        var laypage =layui.laypage;

        window.ServicesList = ${ServicesList};
        console.dir(ServicesList)
        var vm = new Vue({
            el: "#table1",
            data: {
                ServiceList: ServicesList
            },
            methods:{
                editServiceDetailsClick:function(e){
                    var d =e.currentTarget
                    var contractid = d.getAttribute('contractid')
                    var typeid = d.getAttribute('typeid')
                    index = d.getAttribute("tableindex")
                    console.log(d)
                    console.log(contractid)
                    console.log(typeid)

                    layui.use('layer', function () {
                        var layer = layui.layer;
                        var url = "/contract/createcontract/editServiceDetails.do?contractId="+contractid+"&tpyeId="+typeid;
                        Common.openDlg(url,"ContractInfo管理>服务详情>服务流程")
                    })
                }
            }
        })


    })
</script>

<script>



</script>


<!--#} -->
